Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Sep 25, 2025

Description

Currently, the way that CMake creates the library files always generates .dylib files on Mac. Compilation will work fine, but attempting to import in any Python app will cause the import to fail, as the interpreter expects .so files for library files.
For some reason, using the flag
--cmake-args " -DCMAKE_SHARED_LIBRARY_SUFFIX=.so"
does not fix the issue. Additionally, setting the variable before the project() line in the CMakeLists also remains inneffective. So, the workaround is to add
set(CMAKE_SHARED_LIBRARY_SUFFIX .so)
right after the project() line.

@Mergifyio backport 2.3.x 2.2.x 1.4.x

Fixes #206

Contributor Checklist

  • Commit messages follow the project guidelines.
  • N/A: Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • Changes are API compatible.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

This is an automatic backport of pull request #207 done by [Mergify](https://mergify.com).

* Set CMAKE_SHARED_LIBRARY_SUFFIX to always create .so files.

* [#23543] Added cmake option and default suffix for platforms

Signed-off-by: danipiza <dpizarrogallego@gmail.com>

* [#23543] Added cmake option for Python test and examples

Signed-off-by: danipiza <dpizarrogallego@gmail.com>

* [#23543] Default value for Windows OS

Signed-off-by: danipiza <dpizarrogallego@gmail.com>

* [#23543] Review changes

Signed-off-by: danipiza <dpizarrogallego@gmail.com>

* Refs #23543. Regenerate code with Fast DDS Gen from related PR.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

---------

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
Co-authored-by: Keane Wong <kwong@FELT241.FluxErgy.local>
Co-authored-by: danipiza <dpizarrogallego@gmail.com>
Co-authored-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 57a5541)

# Conflicts:
#	fastdds_python/test/types/test_complete.i
#	fastdds_python/test/types/test_modules.i
#	fastdds_python_examples/RPCExample/generated_code/CMakeLists.txt
@mergify
Copy link
Author

mergify bot commented Sep 25, 2025

Cherry-pick of 57a5541 has failed:

On branch mergify/bp/1.4.x/pr-207
Your branch is up to date with 'origin/1.4.x'.

You are currently cherry-picking commit 57a5541.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   fastdds_python/CMakeLists.txt
	modified:   fastdds_python/test/types/CMakeLists.txt
	modified:   fastdds_python_examples/HelloWorldExample/CMakeLists.txt

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   fastdds_python/test/types/test_complete.i
	both modified:   fastdds_python/test/types/test_modules.i
	deleted by us:   fastdds_python_examples/RPCExample/generated_code/CMakeLists.txt

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants